function queryBtn_yjdcinfo(){
	var sTime = $("#sTime").val();
	var eTime = $("#eTime").val();
	var region =$("#sheng").val();
	if($("#xian").val()!="-1"){
		region = $("#xian").val();
	}else if($("#shi").val()!="-1"){
		region = $("#shi").val();
	}
	var sUrl = "findYjdc01ListByCondition.shtml" ;
	var param  = {
		"region":region,
		"sTime":sTime,
		"eTime":eTime
	}
	
	$('#tblyjdc01').datagrid({
				pageNumber : 1,
				url : sUrl,// 000000004512620
				queryParams : param,
				onLoadSuccess : function(response) {
					//top.closeForBaseInvestigate();
					if(response.rows==0) {
						//parent.$("#detailsNSRLSHDialog").dialog('close');
						alert('没有查询结果'); 
						
						return;
					}
				top.addMarkAndPopup(response.rows);
				}
			});
}

function initTblyjdc01(){
	$('#tblyjdc01').datagrid({
		url:"",
		striped : true,
		pageSize : 10,
		height :250,
		width:450,
		nowrap : false,
		showPageList:false,
		rownumbers : true,
		columns : [[{
					field : '1',
					title : '灾点名称',
					width : 150,
					align : 'center',
					formatter : function(value, rec, rowIndex) {// value id rec
						// 该对象
						//curRecObj = rec;
						var name = rec.jbqk0110;
						//createMarkAndPopup();
						//var baleInfoArr.push(new baleInfoObj(baleCoding,baleName,x,y,town,village,group,baseInfo,baleUrl));
						return  "<span style='align:center;cursor:pointer;text-decoration: underline;' " +
						"onclick='top.toLocation(\""+rowIndex+"\","+rec.jbqk0120+","+rec.jbqk0130+")'>"
						+ name
						+ "</span>"
					}
				},{
					field : '5',
					title : '灾害点标识',
					width : 100,
					align : 'center',
					formatter : function(value, rec, rowIndex) {// value id rec
						// 该对象
						var zhdBiaoshi = rec.jbqk0102;
						var type = top.getOperTypeZhdByCode(zhdBiaoshi);
						return  "<div style='align:center;'>"+type+"</div>";
					}
				},{
					field : '2',
					title : '素描图',
					width : 60,
					align : 'center',
					formatter : function(value, rec, rowIndex) {// value id rec
						// 该对象
						return  "<span style='align:center;cursor:pointer;text-decoration: underline;' " +
						"onclick='top.onClickSketchQuery(\""+rec.jbqk0100+"\",\""+rec.jbqk0110+"\",\""+rec.jbqk0102+"\")'>素描图</span>"
					}
				},{
					field : '3',
					title : '定位信息',
					width :80,
					align : 'center',
					formatter : function(value, rec, rowIndex) {// value id rec
						// 该对象
						var zhdbm = rec.jbqk0100;
						var zhdBiaoshi = rec.jbqk0102;
						return  "<span style='align:center;cursor:pointer;text-decoration: underline;' " +
						"onclick='dingweixinxiClick("+zhdbm+","+zhdBiaoshi+")'>定位信息</span>"
					}
				},{
					field : '4',
					title : '轨迹信息',
					width : 80,
					align : 'center',
					formatter : function(value, rec, rowIndex) {// value id rec
						// 该对象
						var zhdbm = rec.jbqk0100;
						var zhdBiaoshi = rec.jbqk0102;
						return  "<span style='align:center;cursor:pointer;text-decoration: underline;' " +
						"onclick='guijixinxiClick("+zhdbm+","+zhdBiaoshi+")'>轨迹信息</span>"
					}
				}]],
		onLoadSuccess : function() {
			//clearTaxLabel("clear");//清空地图上的图标
		},
		pagination : true,
		rownumbers : true,
		singleSelect : true
	});
}
function downloadYJDCImg(filename){
	var url = "jsp/down_center.jsp?flag=uploadImgForYJDC&filename="+filename+"";
	window.open(url);
}

///////////////点击定位信息////////////////////////

function dingweixinxiClick(zhdbm,zhdBiaoshi){
	var sTime = $("#sTime").val();
	var eTime = $("#eTime").val();
	var obj = {sTime:sTime,eTime:eTime,zhdbm:zhdbm,zhdBiaoshi:zhdBiaoshi};
	var url = "queryWdwzforzhdnByCondition.shtml";
	$.post(url,obj,function(res){
		top.dingweixinxiCallback(res);
	});
}

//////////////点击轨迹信息////////////////////////////

function guijixinxiClick(zhdbm,zhdBiaoshi){
	var sTime = $("#sTime").val();
	var eTime = $("#eTime").val();
	var obj = {sTime:sTime,eTime:eTime,zhdbm:zhdbm,zhdBiaoshi:zhdBiaoshi};
	var url = "queryGpslineforzhdByCondition.shtml";
	$.post(url,obj,function(res){
		top.guijixinxiCallback(res);
	});
}


